package com.hzbank.generate.service;

import com.hzbank.generate.entity.AccountDetails;
import com.hzbank.generate.entity.AccountInfo;
import com.hzbank.generate.mapper.AccountDetailsMapper;
import com.hzbank.generate.entity.vo.DetailList;
import com.hzbank.generate.mapper.AccountInfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class InterfaceServiceImpl implements InterfaceService{
    @Autowired
    private AccountInfoMapper infoMapper;
    @Autowired
    private AccountDetailsMapper detailsMapper;

    @Override
    public int insert(AccountDetails details) {
        return detailsMapper.insert(details);
    }

    @Override
    public void update(AccountInfo info) {
        infoMapper.update(info);
    }

    @Override
    public List<AccountDetails> selectDetailsByPrimaryKey(String tranSeq) {
        return detailsMapper.selectDetailsByPrimaryKey(tranSeq);
    }

    @Override
    public List<AccountDetails> list1(DetailList detailList) {
        return detailsMapper.list1(detailList);
    }

    @Override
    public List<AccountDetails> list2(AccountDetails details) {
        return detailsMapper.list2(details);
    }

    @Override
    public List<AccountInfo> selectByDate(Map<String, String> dateMap) {
        return infoMapper.selectByDate(dateMap);
    }

    @Override
    public int infoCount() {
        return infoMapper.countInfo();
    }

    @Override
    public List<AccountDetails> selectAreaListByDate(String dateStart, String dateEnd) {
        return detailsMapper.selectAreaListByDate(dateStart,dateEnd);
    }

}
